package com.shop.index.action;


import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;

import com.shop.config.Config;
import com.shop.config.driver.Property;
import com.shop.index.bean.NewsModelField;
import com.shop.model.impl.BaseModel;


@Controller
@RequestMapping("/Index")
public class IndexController {
	private static String START = "/Index/index";
	
	
	@RequestMapping("/index.do")
	public String start(HttpServletRequest request) {
		
		try {
			NewsModelField model = (NewsModelField)BaseModel.getIntance(NewsModelField.class);
			System.out.println(NewsModelField.id_d);;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		Map<String, Map<String, ?>> a = new HashMap<>();
		
//		request.setAttribute("list", list);
		return START;
	}

	public ModelAndView showPerson(List<?> map) {
		ModelAndView mv = new ModelAndView();
		mv.addObject(map);
		mv.setView("index");
		return mv;
	}
}
